import { Suspense } from "react";
import Loading from '@/components/Loading'

// 路由懒加载
function LazyLoad(Comp: React.LazyExoticComponent<() => JSX.Element>) {
    return (
        // 页面加载效果
        <Suspense fallback={<Loading />}>
            <Comp />
        </Suspense>
    );
}

export default LazyLoad;